/**
 * Created by kfyy035 on 2018/8/2.
 */
const task = {
	state: {
		dealNum: '',
		showDealNum: false,
		showDealDot: false,
		showWarnDot: false
	},
	mutations: {
		SET_DEALNUM: (state, dealNum) => {
			state.dealNum = dealNum
		},
		SET_SHOWDEALNUM: (state, showDealNum) => {
			state.showDealNum = showDealNum
		},
		SET_SHOWDEALDOT: (state, showDealDot) => {
			state.showDealDot = showDealDot
		},
		SET_SHOWWARNDOT: (state, showWarnDot) => {
			state.showWarnDot = showWarnDot
		}
	},
	actions: {
		setDealNum({ commit }, dealNum) {
			return new Promise((resolve, reject) => {
				commit('SET_DEALNUM', dealNum)
				resolve()
			})
		},
		setShowDealNum({ commit }, showDealNum) {
			return new Promise((resolve, reject) => {
				commit('SET_SHOWDEALNUM', showDealNum)
				resolve()
			})
		},
		setShowDealDot({ commit }, showDealDot) {
			return new Promise((resolve, reject) => {
				commit('SET_SHOWDEALDOT', showDealDot)
				resolve()
			})
		},
		setShowWarnDot({ commit }, showWarnDot) {
			return new Promise((resolve, reject) => {
				commit('SET_SHOWWARNDOT', showWarnDot)
				resolve()
			})
		}
	}
}
export default task
